|
|
9.1 | Examining the Routing Table | ||
| 9.1.2 | Determining the gateway of last resort |
|
It is not feasible, or even desirable, for
a router to maintain routes to every possible destination. Instead,
routers keep a default route, or a gateway of last resort. Default
routes are used when the router is unable to match a destination
network with a more specific entry in the routing table. The router
uses this default route to reach the gateway of last resort in an
effort to forward the packet.
A key scalability feature is that default routes keep routing tables as lean as possible. They make it possible for routers to forward packets destined to any Internet host without having to maintain a table entry for every Internet network. Default routes can be statically entered by an administrator or dynamically learned using a routing protocol. Default routing begins with the
administrator. Before routers can dynamically exchange information, an
administrator must configure at least one router with a default route.
Depending on the desired results, an administrator can use either of
the following commands to statically configure a default route:
The
ip default-network
command establishes a default route in networks using dynamic routing
protocols. The global command
ip default-network 192.168.17.0
defines the Class C network 192.168.17.0 as the destination path for
packets that have no routing table entries. For every network
configured with ip
default-network, if a router
has a route to the network, that route is flagged as a candidate for
the default route.
Creating an
ip route to 0.0.0.0/0
is another way to configure a default route.
After configuring a default route or default network, the command show ip route will show the following:
|